projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9eeaa8e
)
disk/part.c: fix potential stack overflow bug
author
Lei Wen
<
[email protected]
>
Tue, 15 Feb 2011 08:56:40 +0000
(16:56 +0800)
committer
Wolfgang Denk
<
[email protected]
>
Tue, 12 Apr 2011 20:58:35 +0000
(22:58 +0200)
If the param pass to get_dev is not the one defined in the block_drvr,
it could make uboot becomes unstable, for it would continue run after
search complete the block_drvr table.
Signed-off-by: Lei Wen <
[email protected]
>
disk/part.c
patch
|
blob
|
history
diff --git
a/disk/part.c
b/disk/part.c
index 13723f23b3113c74fa7b2590de65bf0d7d3c5a6b..f07a17feb8a0e5e03663d986754e346779efe0ad 100644
(file)
--- a/
disk/part.c
+++ b/
disk/part.c
@@
-84,7
+84,7
@@
block_dev_desc_t *get_dev(char* ifname, int dev)
#ifdef CONFIG_NEEDS_MANUAL_RELOC
name += gd->reloc_off;
#endif
- while (name) {
+ while (
drvr->
name) {
name = drvr->name;
reloc_get_dev = drvr->get_dev;
#ifdef CONFIG_NEEDS_MANUAL_RELOC